function [x] = Replacement(population, offspring)

global REPLACEMENT_METHOD POP_SIZE PRECISION;

popu = [population; offspring];

CalculateAptitudes(popu, size(popu, 1));

switch REPLACEMENT_METHOD
    case 'ELITE'
        x = SelectKElite(POP_SIZE, size(popu,1), popu);
end
